<template>
  <div>
    <NotifyHeader></NotifyHeader>
    <div class="chat-view">
      <div class="view" v-for="(value, key, index) in list" :key="index">
        <div class="others">
          <div class="link">
            <div class="left">
              <a href="">
                <img
                  src="https://p1-jj.byteimg.com/tos-cn-i-t2oaga2asx/gold-user-assets/2019/11/8/16e48a80c9589ed5~tplv-t2oaga2asx-no-mark:100:100:100:100.awebp"
                  class="lazy avatar"
                  loading="lazy"
                />
              </a>
              <div class="center">
                <div class="profile">
                  <a href="">
                    <span class="name">{{ value.formUser }}</span>
                  </a>
                  <span class="title"> 关注了你</span>
                </div>
                <div class="job">
                  <div class="info">{{ value.info }}</div>
                </div>
                <div class="info">
                  <span class="time">2天前</span>
                </div>
              </div>
            </div>
            <div class="followed">
              <button class="follow-btn">
                <span>关注</span>
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import NotifyHeader from '@/components/notify-header.vue';
export default {
  data() {
    return {
      list: [
        {
          formUser: '给me一支烟', // xxx to xxx
          status: 0, // 0评论 1回复
          content:
            'angularaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', // 评论内容
          url: '/pin/7121524004212441125', // 沸点路由
          date: 1, // 发布时间
          title:
            '前端什么shgihsihgdadafdafasdsafsadfafdasdsadfa,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.', // 发布的沸点标题
          isLike: 0, // 0 无 1 有
          info: '后台端茶倒水的',
        },
        {
          formUser: '给me一支烟', // xxx to xxx
          status: 1, // 0评论 1回复
          content: 'angular', // 评论内容
          url: '/pin/7121524004212441125', // 沸点路由
          date: 1, // 发布时间
          title: '前端什么.testestsstesssssssssssssssssssssssss..', // 发布的沸点标题
          isLike: 0, // 0 无 1 有
          info: '后台端茶倒水的',
        },
        {
          formUser: '给me一支烟', // xxx to xxx
          status: 1, // 0评论 1回复
          content: 'angular', // 评论内容
          url: '/pin/7121524004212441125', // 沸点路由
          date: 1, // 发布时间
          title: '前端什么...', // 发布的沸点标题
          isLike: 0, // 0 无 1 有
          info: '后台端茶倒水的',
        },
        {
          formUser: '给me一支烟', // xxx to xxx
          status: 0, // 0评论 1回复
          content: 'angular', // 评论内容
          url: '/pin/7121524004212441125', // 沸点路由
          date: 1, // 发布时间
          title: '前端什么...', // 发布的沸点标题
          isLike: 0, // 0 无 1 有
          info: '后台端茶倒水的',
        },
      ],
    };
  },
  components: {
    NotifyHeader,
  },
};
</script>

<style lang="scss" scoped>
.chat-view {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.view {
  background-color: white;
  width: 700px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 5%);
  padding: 1.67rem;
  display: flex;
  margin-bottom: 0.67rem;
  flex-direction: column;
  position: relative;
  .link {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    .left {
      display: flex;
      flex: 1;
      margin-right: 1.67rem;
      .center {
        display: inline-block;
        flex: 1;
        .profile {
          margin-bottom: 2px;
          .name {
            color: #2e3135;
            font-size: 15px;
            font-weight: 500;
          }
        }
        .job {
          margin-bottom: 2px;
        }
      }
    }
    .follow-btn {
      font-size: 1.033rem;
      font-weight: 600;
      height: 2.033rem;
      color: #37c701;
      border-radius: 3px;
      background-color: #fff;
      border: 1px solid #37c701;
      width: 7rem;
    }
  }
}
.title {
  font-size: 15px;
  font-weight: 400;
}
.info {
  font-size: 0.99rem;
  display: flex;
  color: #8a9aa9;
}
a {
  text-decoration: none;
  cursor: pointer;
  color: #909090;
}
.avatar {
  width: 45px;
  height: 45px;
  border-radius: 100%;
  margin-right: 2rem;
}
.lazy {
  position: relative;
  object-fit: cover;
}
</style>
